#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""

@Time   :2025/8/5 下午5:29
@Author :zengjiahao1989@gmail.com
@File   :消息提示模版拼接.py
"""

from langchain_core.prompts import ChatPromptTemplate

system_chat_prompt = ChatPromptTemplate.from_messages([
    ("system", "你是一个聊天机器人，请根据用户提问进行回答，我叫{username}"),
])

humans_chat_prompt = ChatPromptTemplate.from_messages([
    ("human", "{query}")
])

chat_prompt = system_chat_prompt + humans_chat_prompt

print(chat_prompt.invoke({
    "query": "你好，你是？",
    "username": "CrixusZ",
}))
